package com.gis3c.sys.dao;

import com.gis3c.sys.entry.po.Role;

import java.util.List;

public interface RoleDao {
	public Role CreateRole(Role role);
	public void DeleteRole(String roleId);
	public void DeleteRoles(String[] roleIds);
	public void UpdateRole(Role newRole);


	public Role FindRoleById(String roleId);
	public List<Role> FindRoleByName(String roleName);
	public List<Role> FindRoleByAliasName(String aliasName);
	public List<Role> findRolesByUserName(String userName);
	public List<Role> findRolesByUserId(String usernId);

	public List<Role> RoleList(Integer pageSize,Integer currentPage);
	public Integer RoleCount();

    public void correlationRoles(String userId, String... roleIds);
    public void uncorrelationRoles(String userId,String... userIds);


	public Integer correlationMenus(String roleId, String appId, String... menuIds);
	public Integer uncorrelationMenus(String roleId);
	public Integer uncorrelationMenus(String roleId,String appId);
}
